package day02;
//double类型的演示
public class DoubleDemo {
    public static void main(String[] args) {
        //3）double：双精度浮点数，占8个字节
        double a = 3.14;            //3.14为小数直接量，默认为double类型
        float b = 3.33F;            //3.33F为float型直接量

        double c = 3.0,d = 2.9;
        System.out.println(c-d);    //0.10000000000000009,发生舍入误差了
        double e = 6.0,f = 4.9;
        System.out.println(e-f);    //1.0999999999999996，发生舍入误差了
        double g = 6.0,h = 2.9;
        System.out.println(g-h);    //3.1
    }
}
